﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IBasicSalary
    {
        [OperationContract]
        int BasicSalary_Using(int BasicSalaryID);

        [OperationContract]
        DataSet BasicSalary_GetAll();

        [OperationContract]
        BasicSalaryInfo BasicSalary_GetInfo(int BasicSalaryID);

        [OperationContract]
        DataSet BasicSalary_GetList(out int ItemCount, int currentPage, int pageSize);

        [OperationContract]
        int BasicSalary_Insert(BasicSalaryInfo eInfo);

        [OperationContract]
        bool BasicSalary_Update(BasicSalaryInfo eInfo);

        [OperationContract]
        bool BasicSalary_Delete(int BasicSalaryID);

        [OperationContract]
        BasicSalaryInfo BasicSalary_GetInfoByDate(DateTime _DateVal);

        [OperationContract]
        bool BasicSalary_CheckDate(DateTime _FromDate, DateTime _ToDate);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class BasicSalaryInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
       
        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
       DateTime _Month;
        [DataMember]
        public DateTime  Month
        {
            get { return _Month; }
            set { _Month = value; }
        }
        decimal _Amount;
        [DataMember]
        public decimal Amount
        {
            get { return _Amount; }
            set { _Amount = value; }
        }
    }
}
